cmake_minimum_required(VERSION 3.9)
PROJECT(async_udp_server_boost_example)

SET(CMAKE_CXX_STANDARD 17)
SET(Boost_USE_STATIC_LIBS OFF)
SET(Boost_USE_MULTITHREAD ON)
SET(Boost_USE_DEBUG_LIBS OFF)
SET(Boost_USE_RELEASE_LIBS ON)
FIND_PACKAGE(Boost 1.85.0 REQUIRED COMPONENTS system thread)
IF(Boost_FOUND)
    INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
    ADD_EXECUTABLE(async-udp-server server.cpp)
    LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
    TARGET_LINK_LIBRARIES(async-udp-server ${Boost_LIBRARIES})
ENDIF(Boost_FOUND)